#include "NmmToCtrlBoardMessage.h"

#define MAX_RX_POWER (76)
const uint8_t INIT_VALUE_8BITS = 0xff;

enum RanType
{
    RAN_LTE = 0,
    RAN_GERAN = 1,
    RAN_UTRA_FDD = 2,
    RAN_UTRA_TDD = 3,
    RAN_CDMA2000_HRPD = 4,
    RAN_CDMA2000_1XRTT = 5,
    NUM_OF_RAN_TYPE
};


using namespace CtrlBoardMsg;

InitNotification::InitNotification():
band_(0),
duplexMode_(0)
{
}

TxPower::TxPower():
isTxPresent_(false),
isRxPresent_(false),
txPower_(0),
rxPower_(0)
{
}

bool TxPower::syntaxCheck()
{
    if( isRxPresent_ )
    {
        if( rxPower_ > MAX_RX_POWER )
        {
            return false;
        }
    }
    return true;
}

UeRedirect::UeRedirect():
isEnable_(false),
ranType_(NUM_OF_RAN_TYPE),
band_(INIT_VALUE_8BITS)
{
}

bool UeRedirect::syntaxCheck()
{
    if( isEnable_ )
    {
        if( ranType_==NUM_OF_RAN_TYPE || arfcnList_.empty() )
        {
            return false;
        }

        if( ranType_!= RAN_LTE && band_==INIT_VALUE_8BITS )
        {
            return false;
        }
    }

    return true;
}
